﻿namespace Cos.Module.CMS
{
    using System;

    using Cos.Module.CMS.Data;

    using Microsoft.Practices.Unity;

    /// <summary>
    /// The Site Service.
    /// </summary>
    public class SiteService : ISiteService
    {

        /// <summary>
        /// The SiteRepository interface private member.
        /// </summary>
        private readonly ISiteRepository siteRepository;

        /// <summary>
        /// Initializes a new instance of the <see cref="SiteService"/> class.
        /// </summary>
        /// <param name="siteRepository">The site repository.</param>
        [InjectionConstructor]
        public SiteService(ISiteRepository siteRepository)
        {
            this.siteRepository = siteRepository;
        }

        /// <summary>
        /// Gets the site last modification date.
        /// </summary>
        public DateTime SiteLastModificationDate
        {
            get { return this.siteRepository.SiteLastModificationDate; }
        }
    }
}
